package com.sd.view;

import android.content.Context;
import android.view.Gravity;
import android.widget.Toast;

/**
 * 
 * 提示框
 * 
 * @author Administrator
 *
 */
public class ToastManager {

	private static ToastManager instance;
	
	public static ToastManager getInstance(){
		if(instance == null){
			instance = new ToastManager();
		}
		return instance;
	}
	
	public void showText(Context context, int string_id){
		Toast toast = Toast.makeText(context, string_id, Toast.LENGTH_SHORT);
		toast.setGravity(Gravity.CENTER, 0, 0);
		toast.show();
	}
	
	public void showText(Context context,String text){
		Toast toast = Toast.makeText(context, text, Toast.LENGTH_SHORT);
		toast.setGravity(Gravity.CENTER, 0, 0);
		toast.show();
	}
}
